package com.imooc.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


/**
 * tomcat热部署：3种方式
1、直接把项目web文件夹放在webapps里。

springBoot热部署3种方式：
1、在plugin标签中加入插件
<dependencies>
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>springloaded</artifactId>
		<version>1.2.6.RELEASE</version>
	</dependency>
</dependencies>

进入pom文件的目录输入 mvn spring-boot:run启动

2、启动的加入参数 引用springloaded jar包
	-javaagent:'jar包路径' -noverify


3、pom文件加入依赖
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-devtools</artifactId>
	<optional>true</optional>
</dependency>
 * @author zl
 *
 */

@Controller
public class HotDeployController {

	@RequestMapping(value="/say", method=RequestMethod.GET)
	public String say(HttpServletRequest request) {
		request.setAttribute("say", "Hello, Imooc ");
		return "imooc";
	}
}
